package com.example.backendmanage.Tools;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class SwaggerConfig {
    // 访问地址 http://localhost:8081/swagger-ui
    // 使用这个可以自动生成后端测试代码
    @Bean
    public OpenAPI openApi() {
        return new OpenAPI()
                .info(new Info()
                        .title("测试")
                        .description("暂无")
                        .contact(new Contact().name("王磊").email("2665410029@qq.com").url("https://m.kfc.com.cn/wechatcontent/fengsizhenjuandelicious/"))
                        .version("v2.0"));
    }
}